		<?php
		
		if (isset($_GET["subsec"])) {
			if ($_GET["subsec"] == "proveedores" and $_GET["sec"] == "mantencion") {
				echo "
<!-- pop up -->
<div id='login-box' class='login-popup'>
<a href='#' class='close'><img src='images/close_pop.png' class='btn_close' title='Close Window' alt='Close' /></a>
<form method='post' class='signin' action='includes/funciones.php'>

<center><span><h2>Nuevo Proveedor</h2></span></center>
<fieldset class='textbox'>
<center>
<table>
<tr>
<td><span>Rut</span></td>
<td><input type='rut' name='rut' id='rut' required='required'><input type='dv' name='dv' id='dv' required='required'> </td>
</tr>
<tr>
<td><span>Nombre</span></td>
<td><input type='text' name='nombre' id='nombre' required='required'></td>
</tr>
<tr>
<td><span>Comuna</span></td>
<td><input type='text' name='comuna' id='comuna' required='required'></td>
</tr>
<tr>
<td><span>Ciudad</span></td>
<td><input type='text' name='ciudad' id='ciudad' required='required'></td>
</tr>
<tr>
<td><span>Telefono</span></td>
<td><input type='number' name='telefono' id='telefono' required='required'></td>
</tr>
<tr>
<td><span>Email</span></td>
<td><input type='email' name='email' id='email' required='required'/></td>
</tr>
<tr>
<td><span>Fax</span></td>
<td><input type='number' name='fax' id='fax'></td>
</tr>
<tr>
<td><span>Giro</span></td>
<td><input type='text' name='giro' id='giro'></td>
</tr>
<tr>
<td><span>Direccion</span></td>
<td><input type='text' name='direccion' id='direccion'></td>
</tr>
</table>
</center>
<button type='submit' class='submit button' id='do' name='do' value='Registrar Proveedor'>Grabar</button>
</fieldset>
</form>
</div>

</div>
</div>

<!-- end pop up -->
";
			}//end if
			//form categoria
			if ($_GET["subsec"] == "categorias" and $_GET["sec"] == "mantencion") {
				echo "
<!-- pop up -->
<div id='login-box-cat' class='login-popup'>
<a href='#' class='close'><img src='images/close_pop.png' class='btn_close' title='Close Window' alt='Close' /></a>
<form method='post' class='signin' name='form_categoria'  action='includes/funciones.php'>

<center><span><h2>Nueva Categoria</h2></span></center>
<fieldset class='textbox'>
<center>
<table>
<tr>
<td><span>Descripcion</span></td>
<td><input type='text' name='descripcion' id='descripcion' required='required'> </td>
</tr>
</table>
</center>
<button type='submit' class='submit button' id='do' name='do' value='Registrar Categoria' >Grabar</button>
</form>
</div>

</div>
</div>

<!-- end pop up -->
";
			}//endif
			
if ($_GET["subsec"] == "subcategorias" and $_GET["sec"] == "mantencion") {
				echo "
<!-- pop up -->
<div id='login-box-subcat' class='login-popup'>
<a href='#' class='close'><img src='images/close_pop.png' class='btn_close' title='Close Window' alt='Close' /></a>
<form method='post' class='signin' name='form_subcategoria'  action='includes/funciones.php'>

<center><span><h2>Nueva SubCategoria</h2></span></center>
<fieldset class='textbox'>
<center>
<table>
<tr>
<td><span>Categoria</span></td>
<td>
<select name='id_categoria'>
<optgroup label='Categorias Disponibles'>";
$qry=mysql_query("select cat_codigo,cat_descripcion from cat_categoria");
while($row=mysql_fetch_row($qry)){
echo "<option value='$row[0]'>$row[1]";
}
echo"
</select>
 </td>
</tr>
<tr>
<td><span>Descripcion</span></td>
<td><input type='text' name='descripcion' id='descripcion' required='required'> </td>
</tr>
</table>
</center>
<button type='submit' class='submit button' id='do' name='do' value='Registrar Subcategoria' >Grabar</button>
</form>
</div>

</div>
</div>

<!-- end pop up -->
";
}//endif
			if ($_GET["subsec"] == "sucursales" and $_GET["sec"] == "mantencion") {//sucursal
				echo "
<!-- pop up -->
<div id='login-box-suc' class='login-popup'>
<a href='#' class='close'><img src='images/close_pop.png' class='btn_close' title='Close Window' alt='Close' /></a>
<form method='post' class='signin' name='form_categoria'  action='includes/funciones.php'>

<center><span><h2>Nueva Sucursal</h2></span></center>
<fieldset class='textbox'>
<center>
<table>
<tr>
<td><span>Direccion</span></td>
<td><input type='text' name='direccion' id='direccion' required='required'> </td>
</tr>
<tr>
<td><span>Telefono</span></td>
<td><input type='number' name='telefono' id='telefono' required='required'> </td>
</tr>
<tr>
<td><span>Rut</span></td>
<td><input type='text' name='rut' id='rut' required='required'> </td>
</tr>
<tr>
<td><span>Email</span></td>
<td><input type='email' name='email' id='email'> </td>
</tr>
</table>
</center>
<button type='submit' class='submit button' id='do' name='do' value='Registrar Sucursal' >Grabar</button>
</form>
</div>

</div>
</div>

<!-- end pop up -->
";
			}//endif

			if ($_GET["subsec"] == "cajas" and $_GET["sec"] == "mantencion") {
				echo "
<!-- pop up -->
<div id='login-box-cja' class='login-popup'>
<a href='#' class='close'><img src='images/close_pop.png' class='btn_close' title='Close Window' alt='Close' /></a>
<form method='post' class='signin' name='form_categoria'  action='includes/funciones.php'>

<center><span><h2>Nueva Caja</h2></span></center>
<fieldset class='textbox'>
<center>
<table>
<tr>
<td><span>Descripcion</span></td>
<td><input type='text' name='descripcion' id='descripcion' required='required'> </td>
</tr>
<tr>
<td><span>Folio Boleta</span></td>
<td><input type='text' name='folio' id='folio' required='required'> </td>
</tr>
</table>
</center>
<button type='submit' class='submit button' id='do' name='do' value='Registrar Caja' >Grabar</button>
</form>
</div>

</div>
</div>

<!-- end pop up -->
";
			}//endif

			if ($_GET["subsec"] == "cajeros" and $_GET["sec"] == "mantencion") {//cajeros
				echo "
<!-- pop up -->
<div id='login-box-caj' class='login-popup'>
<a href='#' class='close'><img src='images/close_pop.png' class='btn_close' title='Close Window' alt='Close' /></a>
<form method='post' class='signin' name='form_categoria'  action='includes/funciones.php'>

<center><span><h2>Nuevo Cajero</h2></span></center>
<fieldset class='textbox'>
<center>
<table>
<tr>
<td><span>Descripcion</span></td>
<td><input type='text' name='descripcion' id='descripcion' required='required'> </td>
</tr>
<tr>
<tr>
<td><span>Nombre</span></td>
<td><input type='text' name='nombre' id='nombre' required='required'> </td>
</tr>
<tr>
<tr>
<td><span>Email</span></td>
<td><input type='email' name='email' id='email'> </td>
</tr>
<tr>
<td><span>Direccion</span></td>
<td><input type='text' name='direccion' id='direccion' required='required'> </td>
</tr>
<tr>
<td><span>Telefono</span></td>
<td><input type='number' name='telefono' id='telefono' required='required'> </td>
</tr>
<tr>
<td><span>Celular</span></td>
<td><input type='text' name='celular' id='celular' required='required'> </td>
</tr>
<tr>
</table>
</center>
<button type='submit' class='submit button' id='do' name='do' value='Registrar Cajero' >Grabar</button>
</form>
</div>

</div>
</div>

<!-- end pop up -->
";
			}//endif
if ($_GET["subsec"] == "envases" and $_GET["sec"] == "mantencion") {//cajeros
				echo "
<!-- pop up -->
<div id='login-box-env' class='login-popup'>
<a href='#' class='close'><img src='images/close_pop.png' class='btn_close' title='Close Window' alt='Close' /></a>
<form method='post' class='signin' name='form_categoria'  action='includes/funciones.php'>

<center><span><h2>Nuevo Envase</h2></span></center>
<fieldset class='textbox'>
<center>
<table>
<tr>
<td><span>Codigo</span></td>
<td><input type='text' name='codigo' id='codigo' required='required'> </td>
</tr>
<tr>
<tr>
<td><span>Descripcion</span></td>
<td><input type='text' name='descripcion' id='descripcion' required='required'> </td>
</tr>
<tr>
<tr>
<td><span>Sigla</span></td>
<td><input type='text' name='sigla' id='sigla'> </td>
</tr>
</table>
</center>
<button type='submit' class='submit button' id='do' name='do' value='Registrar Envase' >Grabar</button>
</form>
</div>

</div>
</div>

<!-- end pop up -->
";
			}//endif
if ($_GET["subsec"] == "bodegas" and $_GET["sec"] == "mantencion") {//cajeros
				echo "
<!-- pop up -->
<div id='login-box-bod' class='login-popup'>
<a href='#' class='close'><img src='images/close_pop.png' class='btn_close' title='Close Window' alt='Close' /></a>
<form method='post' class='signin' name='form_categoria'  action='includes/funciones.php'>

<center><span><h2>Nueva Bodega</h2></span></center>
<fieldset class='textbox'>
<center>
<table>

<tr>
<tr>
<td><span>Descripcion</span></td>
<td><input type='text' name='descripcion' id='descripcion' required='required'> </td>
</tr>
<tr>
<td><span>jefe</span></td>
<td><input type='text' name='jefe' id='codigo' required='required'> </td>
</tr>
<tr>
<td><span>Email</span></td>
<td><input type='email' name='email' id='email' required='required'> </td>
</tr>
<tr>
<tr>
<td><span>Direccion</span></td>
<td><input type='text' name='direccion' id='direccion'> </td>
</tr>
<tr>
<td><span>Telefono</span></td>
<td><input type='text' name='telefono' id='telefono' required='required'> </td>
</tr>
<tr>
<td><span>Celular</span></td>
<td><input type='text' name='celular' id='celular' required='required'> </td>
</tr>
</table>
</center>
<button type='submit' class='submit button' id='do' name='do' value='Registrar Bodega' >Grabar</button>
</form>
</div>

</div>
</div>

<!-- end pop up -->
";
			}//endif
if ($_GET["subsec"] == "formas_pagos" and $_GET["sec"] == "mantencion") {//cajeros
				echo "
<!-- pop up -->
<div id='login-box-fp' class='login-popup'>
<a href='#' class='close'><img src='images/close_pop.png' class='btn_close' title='Close Window' alt='Close' /></a>
<form method='post' class='signin' name='form_categoria'  action='includes/funciones.php'>

<center><span><h2>Nueva Forma de pago</h2></span></center>
<fieldset class='textbox'>
<center>
<table>

<tr>
<tr>
<td><span>Glosa</span></td>
<td><input type='text' name='glosa' required='required'> </td>
</tr>
<tr>
<td><span>Afecto a IVA</span></td>
<td>
<select name='iva'>
<optgroup label='Elija Opcion'>
<option value='1'>Si</option>
<option value='0'>No</option>
</select>
</td>
</tr>
<tr>
<td><span>Imp. Boleta</span></td>
<td><select name='boleta'>
<optgroup label='Elija Opcion'>
<option value='1'>Si</option>
<option value='0'>No</option>
</select> </td>
</tr>
<tr>
<tr>
<td><span>Con costo</span></td>
<td><select name='costo'>
<optgroup label='Elija Opcion'>
<option value='1'>Si</option>
<option value='0'>No</option>
</select> </td>
</tr>
</table>
</center>
<button type='submit' class='submit button' id='do' name='do' value='Registrar Forma' >Grabar</button>
</form>
</div>

</div>
</div>

<!-- end pop up -->
";
			}//endif
if ($_GET["subsec"] == "clientes" and $_GET["sec"] == "mantencion") {//cajeros
				echo "
<!-- pop up -->
<div id='login-box-cli' class='login-popup'>
<a href='#' class='close'><img src='images/close_pop.png' class='btn_close' title='Close Window' alt='Close' /></a>
<form method='post' class='signin' name='form_categoria'  action='includes/funciones.php'>

<center><span><h2>Nuevo Cliente</h2></span></center>
<fieldset class='textbox'>
<center>
<table>

<tr>
<tr>
<td><span>Rut</span></td>
<td><input type='rut' name='rut' id='rut' required='required'><input type='dv' id='dv' name='dv'></td>
</tr>
<tr>
<tr>
<td><span>Nombre</span></td>
<td><input type='text' name='nombre' required='required'> </td>
</tr>
<tr>
<tr>
<td><span>Direccion</span></td>
<td><input type='text' name='direccion'> </td>
</tr>
<tr>
<tr>
<td><span>Comuna</span></td>
<td><input type='text' name='comuna' > </td>
</tr>
<tr>
<tr>
<td><span>Ciudad</span></td>
<td><input type='text' name='ciudad' > </td>
</tr>
<tr>
<tr>
<td><span>Telefono</span></td>
<td><input type='text' name='telefono' > </td>
</tr>
<tr>
<tr>
<td><span>Email</span></td>
<td><input type='email' name='email' > </td>
</tr>
<tr>
<tr>
<td><span>Fax</span></td>
<td><input type='text' name='fax' > </td>
</tr>
<tr>
<tr>
<td><span>Giro</span></td>
<td><input type='text' name='giro' > </td>
</tr>
</table>
</center>
<button type='submit' class='submit button' id='do' name='do' value='Registrar Cliente' >Grabar</button>
</form>
</div>

</div>
</div>

<!-- end pop up -->
";
			}//endif
if ($_GET["subsec"] == "productos" and $_GET["sec"] == "mantencion") {//cajeros
				?>
    <script src="js/calendario/src/js/jscal2.js"></script>
    <script src="js/calendario/src/js/lang/es.js"></script>
    <link rel="stylesheet" type="text/css" href="js/calendario/src/css/jscal2.css" />
	<link rel="stylesheet" type="text/css" href="js/calendario/src/css/border-radius.css" />	
    <link rel="stylesheet" type="text/css" href="js/calendario/src/css/steel/steel.css" />
    


 <!-- pop up -->
<div id='login-box-pro' class='login-popup-asi'>
<a href='#' class='close'><img src='images/close_pop.png' class='btn_close' title='Close Window' alt='Close' /></a>

            				            <div id="wrapper-asi">
                <div id="steps">
                    <form id="formElem" name="formElem" action="includes/funciones.php" method="post">
                        <fieldset class="step">
                            <legend>Nuevo Producto</legend>
                            <p>
                                <label for="codigo_barra">Codigo Barra</label>
                                <input id="codigo_barra" name="codigo_barra" />
                            </p>
                            <p><label>Codigo</label>
                            	<input id="codigo_prod" name="codigo_prod" />
                            </p>
                            <div id="destino"></div>
                           <!-- <p>
                                <label for="codigo">Codigo</label>
                                <input id="codigo" name="codigo" />
                            </p> -->  
                            <p>
                                <label for="des_corta">Descripcion Corta</label>
                                <input id="des_corta" name="des_corta" />
                            </p>  
                            <p>
                                <label for="des_larga">Descripcion Larga</label>
                                <input id="des_larga" name="des_larga" />
                            </p> 
                            <p>
                                <label for="tipo">Tipo</label>
                                <select id="producto_tipo" name="producto_tipo">
                                	<option value="N">No Pesado</option>
                                	<option value="P">Pesado</option>
                                </select>
                            </p> 
                            <p>
                                <label for="categoria">Categoria</label>
<select name='categoria'>
<optgroup label='Categorias Disponibles'>";
	<?php
$qry=mysql_query("select cat_codigo,cat_descripcion from cat_categoria");
while($row=mysql_fetch_row($qry)){
echo "<option value='$row[0]'>$row[1]</option>";
}
?>
</select>
                            </p> 
                            <p>
                                <label for="subcategoria">Subcategoria</label>
<select name='subcategoria'>
<optgroup label='SubCategorias Disponibles'>";
	<?php
$qry=mysql_query("select sbc_codigo,sbc_descripcion from sbc_subcategoria");
while($row=mysql_fetch_row($qry)){
echo "<option value='$row[0]'>$row[1]</option>";
}
?>
</select>
                            </p>                                     

                        </fieldset>
                        <fieldset class="step">
                            <legend>Nuevo Producto</legend>
                            <p>
                                <label for="cardnumber">Precio Costo</label>
                                <input id="precio_costo" name="precio_costo" type="number" class="pcosto" AUTOCOMPLETE=OFF />
                            </p>
                            <p>
                                <label for="cardnumber">Precio Venta</label>
                                <input id="precio_venta" name="precio_venta" type="number" class="pventa" AUTOCOMPLETE=OFF />
                            </p>
                            <p>
                                <label for="cardnumber">Margen</label>
                                <input id="margen" name="margen" type="number" class="margen" AUTOCOMPLETE=OFF />
                            </p>
                            <p>
                                <label for="proveedor">Proveedor</label>
<select name='proveedor'>
<optgroup label='Proveedores Disponibles'>";
	<?php
$qry=mysql_query("select prv_rut,prv_nombre from prv_proveedor");
while($row=mysql_fetch_row($qry)){
echo "<option value='$row[0]'>$row[1]</option>";
}
?>
</select>
                            </p> 
                            <p>
                                <label for="subcategoria">Unidad Compra</label>
<select name='unidad_compra'>
<optgroup label='Unidades Disponibles'>";
	<?php
$qry=mysql_query("select env_codigo,env_sigla from env_envase");
while($row=mysql_fetch_row($qry)){
echo "<option value='$row[0]'>$row[1]</option>";
}
?>
</select>
                            </p>
                            <p>
                                <label for="subcategoria">Unidad Venta</label>
<select name='unidad_venta'>
<optgroup label='Unidades Disponibles'>";
	<?php
	mysql_query("delete from for_formulas where for_formula='temp'");
$qry=mysql_query("select env_codigo,env_sigla from env_envase");
while($row=mysql_fetch_row($qry)){
echo "<option value='$row[0]'>$row[1]</option>";
}
?>
</select>
                            </p>  
                            <p>
                                <label for="cardnumber">Fecha Ingreso</label>
                                <input id="fecha_ingreso" name="fecha_ingreso" value="<?php echo date("d-m-Y H:i:s");?>" readonly="readonly"/>
                            </p>
                        </fieldset>
                        <fieldset class="step">
                            <legend>Nuevo Producto</legend>
                            <p>
                                <label for="name">Stock Minimo Bodega</label>
                                <input id="stock_minimo_bodega" name="stock_minimo_bodega" type="number" />
                            </p>
                            <p>
                                <label for="name">Stock Critico Bodega</label>
                                <input id="stock_critico_bodega" name="stock_critico_bodega" type="number" />
                            </p>  
                            <p>
                                <label for="name">Stock Maximo Bodega</label>
                                <input id="stock_maximo_bodega" name="stock_maximo_bodega" type="number" />
                            </p>     
                            <p>
                                <label for="name">Stock Minimo Sala Venta</label>
                                <input id="stock_minimo_sala_venta" name="stock_minimo_sala_venta" type="number" />
                            </p>   
                            <p>
                                <label for="name">Stock Maximo Sala Venta</label>
                                <input id="stock_maximo_sala_venta" name="stock_maximo_sala_venta" type="number" />
                            </p>  
                            <p>
                                <label for="tipo">Estado</label>
                                <select id="estado" name="estado">
                                	<option value="A">Activo</option>
                                	<option value="I">Inactivo</option>
                                </select>
                            </p> 
                                                                      
                        </fieldset>
                        <fieldset class="step">
                            <legend>Nuevo Producto Formula</legend>
                              <p><label>Formulanle</label><input name="check_formula" id="check_formula" type="checkbox" value="S" checked="checked"/>
  							</p>     
                          
 <p>
<label for="segundo_producto">Ingrediente</label>
<select name='valor_uno' id="valor_uno">
<optgroup label='Productos Disponibles'>";
	<?php
$qry=mysql_query("select pro_codigo,pro_descripcion_corta from pro_productos");
while($row=mysql_fetch_row($qry)){
echo "<option value='$row[0]'>$row[1]</option>";
}
?>
</select> 
</p>
                        <!--<tr>
                            <td>Descripcion Ingrediente</td>
                            <td><input name="valor_dos" type="text" id="valor_dos" size="40" class="required" /></td>
                        </tr> -->

                       <p>     <label for="porcentaje">Porcentaje %</label>
                            <input name="valor_dos" type="text" id="valor_dos" size="30" placeholder="20"/>
                     </p>
                     <p>
                          <input name="agregar" type="button" id="agregar" value="Agregar" />
                     </p>
            
            <table id="grilla" class="lista">
              <thead>
                    <tr>
                        <th>Codigo Ingrediente</th>
                        <!--<th>Nombre Oferta</th>-->
                        <th>Porcentaje Ingrediente</th>
                    </tr>
                </thead>
                <tbody>
                </tbody>
            </table>
            
              </fieldset>
              
              <fieldset class="step">
                            <legend>Nuevo Producto Oferta</legend>
                            
  							 <p><label>Oferta</label><input name="check_oferta" id="check_oferta" type="checkbox" value="S" checked="checked"/>
  							</p> 
<!-- aca iva el select de producto oferta -->
<div id="cale">
   <table>
      <tr>
        <td style="width: 10em">
          <div id="cont"></div>
          
        </td>
      </tr>
    </table>
</div>
	
                            <p>
                                <label for="country">Mombre de Oferta</label>
                                <input type='text' name='nombre_oferta' id="nombre_oferta"/>

                            </p>	

                            <p>
                                <label for="country">Fecha Inicio</label>
                                <input type='text' name='fecha_inicio' id="fecha_inicio" readonly/>

                            </p>
                            <p>
                                <label for="country">Fecha Fin</label>
                                <input type='text' name='fecha_fin' id="fecha_fin" readonly/>
                            </p>
                           <p>
                                <label for="cantidad">Cantidad</label>
                                <input type='number' name='cantidad_oferta' id="cantidad_oferta"/>
                            </p>
                           <p>
                                <label for="cantidad">Targeta Local</label>
                                  <select id="targeta_local" name="targeta_local" id="targeta_local">
                                	<option value="N">No</option>
                                	<option value="S">Si</option>
                                </select>
                            </p> 
                                                     
                          
                        </fieldset>
						<fieldset class="step">
                            <legend>Nuevo Producto Oferta</legend>
                            
 <p>
                                <label for="descuento">Descuento %</label>
                                <input type='number' name='descuento' id="descuento" />
                            </p>                           
                           <p>
                                <label for="valor_ultimo">Valor Ultimo Producto</label>
                                <input type='number' name='valor_ultimo' id="valor_ultimo" "/>
                           </p>
<p>
<label for="segundo_producto">Segundo Producto</label>
<select name='segundo_producto' id="segundo_producto">
<optgroup label='Productos Disponibles'>";
	<?php
$qry=mysql_query("select pro_cod_barra,pro_descripcion_corta from pro_productos");
while($row=mysql_fetch_row($qry)){
		echo "<option value='0'>Ninguno</option>";
echo "<option value='$row[0]'>$row[1]</option>";
}
?>
</select> 
</p>
<p>
	 
                            <p class="submit">
                                <button id="registerButton" name="do" type="submit" value="Registrar Producto">Grabar</button>
                            </p>
	</p>
                        </fieldset>
                    </form>
                </div>
                <div id="navigation" style="display:none;">
                    <ul>
                        <li class="selected">
                            <a href="#">Calsificacion</a>
                        </li>
                        <li>
                            <a href="#">Datos</a>
                        </li>
                        <li>
                            <a href="#">Stock</a>
                        </li>
                        <li>
                            <a href="#">Formula</a>
                        </li>
                        <li>
                            <a href="#">Oferta parte 1</a>
                        </li>
						<li>
                            <a href="#">Oferta parte 2</a>
                        </li>
                    </ul>
                </div>
            </div>
            


</div>

</div>
</div>

<!-- end pop up -->
<?php ;
include "includes/inicia_calendario.php";

			}//endif

if ($_GET["subsec"] == "usuarios" and $_GET["sec"] == "mantencion") {//cajeros
				echo "
<!-- pop up -->
<div id='login-box-s_usr_' class='login-popup'>
<a href='#' class='close'><img src='images/close_pop.png' class='btn_close' title='Close Window' alt='Close' /></a>
<form method='post' class='signin' name='form_categoria'  action='includes/funciones.php'>

<center><span><h2>Nuevo Usuario</h2></span></center>
<fieldset class='textbox'>
<center>
<table>

<tr>
<tr>
<td><span>Rut</span></td>
<td><input type='rut' name='rut' id='rut' required='required'><input type='dv' id='dv' name='dv'></td>
</tr>
<tr>
<tr>
<td><span>Nombre</span></td>
<td><input type='text' name='nombre' required='required'> </td>
</tr>
<tr>
<tr>
<td><span>Grupo</span></td>
<td>
<select name='grupo'>
<optgroup label='Grupos Disponibles'>";
$qry=mysql_query("select * from s_grp_grupos");
while($row=mysql_fetch_row($qry)){
echo "<option value='$row[0]'>$row[1]";
}
echo"
</select>
</td>
</tr>
<tr>
<tr>
<td><span>Usuario</span></td>
<td><input type='text' name='usuario' required='requiered'> </td>
</tr>
<tr>
<tr>
<td><span>Clave</span></td>
<td><input type='password' name='clave' requiered='requiered' > </td>
</tr>
<tr>
</table>
</center>
<button type='submit' class='submit button' id='do' name='do' value='Registrar Usuario' >Grabar</button>
</form>
</div>
</div>
</div>

<!-- end pop up -->
";
			}//endif
			
			if ($_GET["subsec"] == "grupos" and $_GET["sec"] == "mantencion") {//cajeros
				mysql_query("delete from s_axg_actgrps where saxg_grupo='TEMP'");
				{?>
					

<!-- pop up -->
<div id='login-box-grp' class='login-popup-asi'>
<a href='#' class='close'><img src='images/close_pop.png' class='btn_close' title='Close Window' alt='Close' /></a>
<div id="wrapper-asi">
	<div id="steps">
<form method='post' class='signin' name='form_categoria'  action='includes/funciones.php'>

       <fieldset class="step">
<legend>Nuevo Grupo</legend>
<p>
<label for="codigo_barra">Grupo</label>
<input id="grupo" name="grupo" type="text" required="required" />
</p>

<p>
<label for="descripcion">Descripcion</label>
<input id="descripcion" name="descripcion" type="text" required="required" />
</p>                 
                            
<p>
<label for="descripcion">Areas</label>
<select name='areas' id='areas' class="areas">
<optgroup label='Opciones Disponibles'>
<?php
$qry=mysql_query("SELECT * FROM s_are_areas");
while($row=mysql_fetch_row($qry)){
echo "<option value='$row[0]'>$row[1]";
}
?>
</select>	
</p>                 
       
<p id='actividad_div'>


</p>                 
       
<p>
<input name="agregarg" type="button" id="agregarg" value="Agregar" />
</p>
     <div style="height:160px;width:600px; overflow:scroll;">        
<table id="grillag" class="lista">
<thead>
<tr>

<th>Codigo Act.</th>
<th>Codigo Area</th>
<th>Actividad</th>
<th>Area</th>
</tr>
</thead>
<tbody>
</tbody>
</table>
</div> 
<p class="submit">
                                <button type="submit" class="submit" name="do" value="Registrar Grupo">Grabar</button>
                              
                            </p>
</fieldset>
                           
</form>
</div>
</div>
</div>

<!-- end pop up -->
<?php } 
			}//endif

		}
		?>